/**
 * BrandBigData.com Inc.
 * Copyright (c) 2016 All Rights Reserved.
 */
package com.qibao.toolkit.protocol.protocols;

import org.apache.commons.lang3.StringUtils;
import org.apache.http.client.fluent.Request;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author xumin
 * @version $Id:DataShareGetProtocol.java, v0.1 2017/12/19 10:11 xumin
 */
@Component
public class ProxyHttpPostProtocol extends HttpPostProtocol {

    @Value("${http.proxy.address:}")
    private String proxyAddress;

    @Override
    protected void setProxy(Request request) {
        if (StringUtils.isNotEmpty(proxyAddress)) {
            request.viaProxy(proxyAddress);
        }
    }

}
